Skip to content

RFC 002 phase A: headless core + Blade starter kit - #45

Merged
sambhav-aggarwal merged 1 commit into
mainfrom
feature/headless_starter_kits
Jul 2, 2026
Merged

RFC 002 phase A: headless core + Blade starter kit#45
sambhav-aggarwal merged 1 commit into
mainfrom
feature/headless_starter_kits

Conversation

@sambhav-aggarwal

Copy link
Copy Markdown
Member

What

Implements phase A of RFC 002: neev becomes headless by default (the Fortify role), and the UI ships as a starter kit that is ejected into the app once and becomes app-owned code (the Jetstream/Breeze role) — per the maintainer-agreed design.

Changes

  • ui config (NEEV_UI: 'blade' | null). Default null = headless: no Blade page routes; API, OAuth/SSO, and email flows fully functional standalone. 'blade' registers the page routes, rendered from app-owned views.
  • Page templates (58 files) moved to stubs/blade/views/. New neev:ui {kit} [--force] command ejects them to resources/views/vendor/neev — the existing publish path, so consumers who already published keep working unchanged. Never overwrites app files without --force.
  • Email templates are app-owned from day one: the installer ejects them regardless of kit choice, while the package keeps fallback copies so a fresh headless install still sends verification mail with zero setup. The per-template variable contract (RFC 002 §5.5) is documented and treated as API.
  • neev:install gains the kit prompt (blade/none, default blade) as a third argument and delegates to neev:ui — keeping its fresh-install guard intact (§8 Q3 resolution).
  • Machine-facing web routes stay always-on: the OAuth redirect/callback are IdP contracts, not kit UI — they moved out of the gated section.
  • Headless email links point at the app's frontend instead of the unregistered Blade routes: verification → {app.url}/verify-email?{signed query for 'mail.verify'}; new-user team invitations → {app.url}/register?invitation_id=…&hash=… (matching the existing frontend-link conventions of the API flows).
  • Publish tags: neev-views replaced by neev-blade-kit + neev-mail; Blade component/layout paths register only when the kit exists in the app.

BREAKING (major release, per RFC)

  • Package no longer auto-loads page views; Blade page routes require 'ui' => 'blade'. UPGRADING.md covers all three consumer situations (Blade users: run neev:ui blade; published-views users: just set the config; headless users: nothing).

Testing

  • Suite runs the Blade flows against the stubs, simulating an ejected app (tests/TestCase boots with ui=blade + stub view paths)
  • New HeadlessModeTest: page routes 404 / names unregistered, machine-facing routes present, API login works, verification and invitation emails link to the frontend with valid signed queries
  • New InstallUiCommandTest: blade/none ejection matrices, --force semantics (app files never clobbered silently), unknown kit fails
  • 1004 tests green; Pint and PHPStan clean; full docs sweep (installation, configuration, cli-commands, web-routes, READMEs)

Next (per RFC)

Phase B: React starter kit (future, extracted from the TAILLOG SPA work). Phase C: docs polish / marketing framing.

The package is now headless by default, Fortify-style. Page views are
no longer auto-loaded; the UI ships as a starter kit that is ejected
into the app once and becomes app-owned code.

- New 'ui' config (NEEV_UI: 'blade' | null). null (default) registers
  no Blade page routes — API, OAuth/SSO, and email flows are fully
  functional standalone. 'blade' registers the page routes, rendered
  from the app-owned views
- Page templates moved to stubs/blade/views/; new neev:ui {kit}
  [--force] command ejects them to resources/views/vendor/neev (the
  existing publish path, so already-published consumers keep working).
  It never overwrites app files without --force
- Email templates are ejected by the installer regardless of kit —
  app-owned and editable from day one — while the package keeps
  fallback copies so headless installs send mail with zero setup. The
  per-template variable contract (RFC 002 §5.5) is documented and
  treated as API
- neev:install gains the kit prompt (blade/none, default blade) as a
  third argument and delegates ejection to neev:ui
- Machine-facing web routes (OAuth redirect/callback) stay always-on:
  they are IdP contracts, not kit UI
- Headless email links target the app frontend instead of the now
  unregistered Blade routes: verification links carry the signed query
  for the API 'mail.verify' endpoint ({app.url}/verify-email?...),
  new-user team invitations link to {app.url}/register?invitation_id=…
- Publish tags: neev-views replaced by neev-blade-kit + neev-mail
- Blade component/layout paths register only when the kit is ejected

Tests: suite exercises the Blade flows against the stubs (simulating
an ejected app); new HeadlessModeTest (routes absent, API works,
frontend email links) and InstallUiCommandTest (ejection, --force
semantics, unknown kit). 1004 green; Pint and PHPStan clean. RFC 002
§8 questions resolved: single Blade kit incl. app-shell views;
ejection via the dedicated neev:ui command.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Caution

This repository is currently using the Sentry GitHub App to receive Codecov PR comments. This integration will be deprecated on July 8, 2026. Please install the Codecov GitHub App to continue receiving coverage reports on your pull requests.
❌ Patch coverage is 79.26829% with 17 lines in your changes missing coverage. Please review.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/Commands/InstallNeev.php | 0.00% | 9 Missing ⚠️ |
| src/Commands/InstallUi.php | 86.04% | 6 Missing ⚠️ |
| src/NeevServiceProvider.php | 80.00% | 2 Missing ⚠️ |

📢 Thoughts on this report? Let us know!

@sambhav-aggarwal
sambhav-aggarwal merged commit 38f7b87 into main Jul 2, 2026
4 checks passed
@sambhav-aggarwal
sambhav-aggarwal deleted the feature/headless_starter_kits branch July 2, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants